package com.shortchainsystem.link.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.shortchainsystem.model.domain.link.DO.BrowserStatsDO;
import com.shortchainsystem.model.domain.link.DO.IpLocationStatsDO;
import com.shortchainsystem.model.domain.link.DO.OSStatsDO;
import com.shortchainsystem.model.domain.link.LinkStats;
import com.shortchainsystem.model.domain.link.VO.AccessHistoryVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.time.LocalDateTime;
import java.util.List;

@Mapper
public interface LinkStatsMapper extends BaseMapper<LinkStats> {
    List<AccessHistoryVO> getAccessHistory(String shortUrl,String userId);

    List<BrowserStatsDO> getBrowserCount(String userId, LocalDateTime startDateTime);

    List<OSStatsDO> getOSCount(String userId, LocalDateTime startDateTime);

    List<IpLocationStatsDO> getIpLocationCount(String userId, LocalDateTime startTime, String os, String browser);
}
